package main

import "fmt"

func main() {
	people := make([]int, 35)
	for i := 0; i < 35; i++ {
		people[i] = i + 1
	}

	var offBoat []int
	index := 0

	for len(people) > 0 {
		index = (index + 8) % len(people)
		offBoat = append(offBoat, people[index])
		people = append(people[:index], people[index+1:]...)
	}

	fmt.Println("最后下船的编号：", offBoat)
}

